package top.kaoshanji.p2ch14b;

/**
 * 代码清单-p2ch14b-153页a：抽象中介者
 * @author kaoshanji
 * ^_^
 * create time 2025/3/23 14:22
 */
public abstract class AbstractMediator {

    protected Purchase purchase;
    protected Sale sale;
    protected Stock stock;

    // 构造函数
    public AbstractMediator() {
        purchase = new Purchase(this);
        sale = new Sale(this);
        stock = new Stock(this);
    }

    // 中介者最重要的方法叫做 事件方法，处理多个对象之间的关系
    public abstract void execute(String str, Object...objects);


}
